#ifndef ICONDELEGATE_H
#define ICONDELEGATE_H

#include <QMovie>
#include <QWidget>

namespace Ui {
class IconDelegate;
}

class IconDelegate : public QWidget
{
    Q_OBJECT

public:
    explicit IconDelegate(QWidget *parent = nullptr);
    ~IconDelegate();

    QString file() const;
    void setFile(QString newFile);

    void setDevice(QPaintDevice *newDevice);

    void repaint();

private:
    Ui::IconDelegate *ui;

    QString m_file;
    QMovie m_movie;
    QPaintDevice *m_device;
};

#endif // ICONDELEGATE_H
